﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;

/// <summary>
/// Summary description for LinkUtil
/// </summary>
public class LinkUtil
{

	public LinkUtil()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    

    public static string linkNews(string idNews,string idCategory,string urlPage)
    {

        if (urlPage.Substring(0, 4) == "http")
        {
            return urlPage;
        }
        else
        {
            return "/c" + idNews + "/" + idCategory + "/" + urlPage + ".aspx";
        }
        
    }
    public static string linkCageory(string idCategory,string page ,string urlPage)
    {
        if (urlPage.Substring(0, 4) == "http")
        {
            return urlPage;
        }
        else
        {
            return "/s" + idCategory + "/" + page + "/" + urlPage + ".aspx";
        }
    }
  
}